package com.tz.water.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tz.water.bean.Device;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

@Service
public class DeviceMapperImpl  {

    @Autowired
    DeviceMapper deviceMapper;

    public void updatestate (Device device) {
        device.setId(1);
        deviceMapper.updateById(device);
    }

    public Device getlast () {
        Device device1= deviceMapper.selectById(1);
        return device1;
    }
}
